From: Rotem Liss Date: Tue, 10 Jun 2008 18:55:32 +0000 (+0000) Subject: Avoid some of the strict JS warnings in Firefox. X-Git-Tag: 1.31.0-rc.0~47058 X-Git-Url: http://git.cyclocoop.org//%22http:/%22.attribut_html%28%24lesurls%5B%24numero%5D%29.%22/%22?a=commitdiff_plain;h=01cbe6454bb17001f416f7d13b802158ae6dd68f;p=lhc%2Fweb%2Fwiklou.git Avoid some of the strict JS warnings in Firefox. --- diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js index d7d03f944d..52470060ff 100644 --- a/skins/common/mwsuggest.js +++ b/skins/common/mwsuggest.js @@ -96,14 +96,16 @@ function os_encodeQuery(value){ if(escape) { return escape(value); } + return null; } function os_decodeValue(value){ if (decodeURIComponent) { return decodeURIComponent(value); - } + } if(unescape){ return unescape(value); } + return null; } /** Brower-dependent functions to find window inner size, and scroll status */ @@ -452,7 +454,7 @@ function os_updateSearchQuery(r,newText){ /** Find event target */ function os_getTarget(e){ - if (!e) var e = window.event; + if (!e) e = window.event; if (e.target) return e.target; else if (e.srcElement) return e.srcElement; else return null; @@ -525,7 +527,7 @@ function os_eventKeypress(e){ /** Catch the key code (Firefox bug) */ function os_eventKeydown(e){ - if (!e) var e = window.event; + if (!e) e = window.event; var targ = os_getTarget(e); var r = os_map[targ.id]; if(r == null) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 2982607857..802b595078 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -58,7 +58,7 @@ function importScript(page) { var loadedScripts = {}; // included-scripts tracker function importScriptURI(url) { if (loadedScripts[url]) { - return; + return null; } loadedScripts[url] = true; var s = document.createElement('script');